Skip to content

fix: order ui accent before nested config tables - #2698

Merged
Pimpmuckl merged 2 commits into
masterfrom
akbash/2697-order-default-accent
Sep 13, 2026
Merged

fix: order ui accent before nested config tables#2698
Pimpmuckl merged 2 commits into
masterfrom
akbash/2697-order-default-accent

Conversation

@akbash-bot

@akbash-bot akbash-bot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • emit the ui.accent example before nested [ui.*] tables in --default-config
  • add a regression test for the parent-before-child TOML ordering

Rebased onto current master (fc44f61a); the only conflict was in src/main.rs, resolved by keeping master's updated sidebar built-ins list (which added the machine token) and placing the accent example above it.

Checks

  • just check passes after the rebase: formatting, clippy, 2,949 Rust tests, maintenance/UI hot-path/integration-assets/docs contract tests, and cargo build --locked
  • cargo test default_config_lists_ui_accent_before_nested_tables -- --nocapture
  • generated --default-config, uncommented ui.accent and [ui.sidebar.spaces] in place, then herdr config check (config: ok)

refs #2697

@kangal-bot kangal-bot added the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: f2a21690-b44f-4abb-8cbc-53527b42d340

📥 Commits

Reviewing files that changed from the base of the PR and between dfb0ca1 and c2bb7d3.

📒 Files selected for processing (1)
  • src/main.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The default configuration now documents ui.accent before the nested sidebar settings. The duplicate block was removed. A regression test verifies uniqueness and ordering.

Changes

UI accent configuration ordering

Layer / File(s) Summary
Default configuration and ordering test src/main.rs The documented ui.accent examples now appear before the sidebar configuration tables. The duplicate block was removed. A test verifies uniqueness and ordering.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to c2bb7

The configuration ordering change includes regression coverage for the intended TOML parent-before-child ordering. No remaining merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: ordering the ui.accent example before nested configuration tables.
Description check ✅ Passed The description directly explains the configuration ordering change, regression test, rebase, and validation results.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/main.rs (1)

927-934: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Make the regression test reject duplicate accent documentation.

find returns the first matching block. If the removed later block is reintroduced, accent < sidebar still passes. Count the accent documentation marker and assert that it occurs exactly once before checking the ordering.

Proposed test improvement
 #[test]
 fn default_config_lists_ui_accent_before_nested_tables() {
-    let accent = DEFAULT_CONFIG.find("# accent = \"cyan\"").unwrap();
-    let sidebar = DEFAULT_CONFIG.find("# [ui.sidebar.agents]").unwrap();
+    let accent_marker = "# Accent color for highlights, borders, and navigation UI.";
+    assert_eq!(DEFAULT_CONFIG.matches(accent_marker).count(), 1);
+    let accent = DEFAULT_CONFIG.find("# accent = \"cyan\"").unwrap();
+    let sidebar = DEFAULT_CONFIG.find("# [ui.sidebar.agents]").unwrap();

     assert!(accent < sidebar);
 }

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8ac84c1f-388d-4ac8-9524-b218cf4232a6

📥 Commits

Reviewing files that changed from the base of the PR and between 5600197 and 7ae63e0.

📒 Files selected for processing (1)
  • src/main.rs

@akbash-bot

Copy link
Copy Markdown
Collaborator Author

CodeRabbit review 4913662039: agreed, fixed in dfb0ca1.

@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge.

Summary

  • Moves the ui.accent example before the first nested [ui.*] table.
  • Adds a regression test enforcing that ordering and ensuring the example appears once.

Reviews (2) · Last reviewed commit: "test: reject duplicate ui accent example..."

@ogulcancelik

Copy link
Copy Markdown
Collaborator

@akbash-bot the implementation review is clean. please rebase onto current master and rerun checks and both review bots.

@akbash-bot

Copy link
Copy Markdown
Collaborator Author

@ogulcancelik rebased cleanly onto current master (7d56b4c5) and reran the focused test successfully; rebased head is b9a5cb8f on akbash-bot/herdr:akbash/2697-order-default-accent. I cannot update this PR’s canonical herdrdev/herdr head: the bot currently has push: false, and the force-with-lease push is rejected with HTTP 403. The PR remains at dfb0ca11, so CI and review bots cannot rerun yet. Please restore bot write access or update the canonical branch from the rebased fork head, then tag me to complete the checks/review pass.

@Pimpmuckl

Copy link
Copy Markdown
Collaborator

@akbash-bot if this is still relevant given the current master head (check that please), rebase and solve main.rs conflicts. Then re-run ci/reviews and deliver a clean PR

@akbash-bot

Copy link
Copy Markdown
Collaborator Author

@Pimpmuckl still relevant on master fc44f61a: ui.accent remains below [ui.sidebar.spaces]. Rebased and resolved main.rs, preserving master’s new machine sidebar token. Updated head: akbash-bot/herdr:akbash/2697-order-default-accent (74bfce90).

Focused regression, formatting, clippy, 3,418 Rust tests, maintenance tests, and integration tests passed with Zig 0.16.0. Local just check stopped only at Windows cross-lint because this VPS lacks its SDK configuration.

Still blocked updating this existing PR: akbash-bot has push: false on herdrdev/herdr; the canonical force-with-lease push returned HTTP 403. The PR remains at dfb0ca11, so I cannot run CI/reviews on the rebased head here. Please update the canonical branch from 74bfce90 or restore write access, then tag me to finish the CI and both-bot review pass.

@Pimpmuckl

Copy link
Copy Markdown
Collaborator

Got it, I'll take over

@Pimpmuckl
Pimpmuckl force-pushed the akbash/2697-order-default-accent branch from dfb0ca1 to c2bb7d3 Compare September 13, 2026 12:34
@Pimpmuckl

Copy link
Copy Markdown
Collaborator

@greptileai re-review requested on the rebased head (c2bb7d3) now that the main.rs conflict is resolved and CI is green.

@Pimpmuckl

Copy link
Copy Markdown
Collaborator

Takeover done. Rebased onto current master (fc44f61a) and force-pushed to the canonical head akbash/2697-order-default-accent (c2bb7d32). The only conflict was in src/main.rs; resolved by keeping master's updated sidebar built-ins line (with the new machine token) and placing the accent example above it. Result is tree-identical to akbash-bot's fork rebase.

Validation:

CI is green on c2bb7d32 (linux/macos/windows, Windows ConPTY, conventional-commits), CodeRabbit is green, and Greptile Review is green (5/5). No inline review comments to address. Ready for maintainer merge.

@Pimpmuckl
Pimpmuckl self-requested a review September 13, 2026 12:50
@Pimpmuckl
Pimpmuckl merged commit f48cd6a into master Sep 13, 2026
11 of 12 checks passed
@Pimpmuckl
Pimpmuckl deleted the akbash/2697-order-default-accent branch September 13, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Trigger automated AI reviews for pull requests admitted by the PR gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants